Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate from databaseUsername to databaseAccount and fully use MariaDBAccount #348

Conversation

zzzeek
Copy link
Contributor

@zzzeek zzzeek commented Feb 20, 2024

This moves cinder to fully use MariaDBAccount based on the dev work being done for mariadb-operator:

https://github.com/openstack-k8s-operators/mariadb-operator/pull/184/files

Lead Jira: OSPRH-4095

  1. controller calls EnsureMariaDBAccount up front to make sure MariaDBAccount is present
  2. error code from EnsureMariaDBAccount is handled, Conditions are amended when error is returned
  3. controller calls NewDatabaseForAccount instead of NewDatabase
  4. GetAccountAndSecret is used to retrieve account /secret to populate template
  5. GetDatabaseByName() , normally used for delete finalizers, replaced with GetDatabaseByNameAndAccount
  6. CreateOrPatchAll() used to patch the Database, replacing CreateOrPatchDB / CreateOrPatchDBByName
  7. controller calls DeleteUnusedMariaDBAccountFinalizers when launched pods are definitely running on a new MariaDBAccount, returns error code if present
  8. PasswordSelectors that refer to database are removed
  9. all databaseUser replaced with databaseAccount inside of all XYZ_types.go
  10. all databaseUser replaced with databaseAccount inside of all kuttl/*.yaml
  11. all default databaseUser names become databaseAccount, replacing underscores with dashes inside of all XYZ_types.go
  12. all default databaseUser names become databaseAccount, replacing underscores with dashes inside of all kuttl/*.yaml
  13. MariaDBAccountSuiteTests are used in controller ginkgo tests if it has them
  14. 184 is merged and replaces from go.mod are removed

@openshift-ci openshift-ci bot requested review from Akrog and stuggi February 20, 2024 16:46
@zzzeek zzzeek changed the title new API to allow services to generate MariaDBAccount migrate from databaseUsername to databaseAccount and fully use MariaDBAccount Feb 20, 2024
@zzzeek zzzeek force-pushed the integrate_oo_accounts branch from 8fa501b to 6202636 Compare February 20, 2024 21:24
@zzzeek zzzeek force-pushed the integrate_oo_accounts branch 4 times, most recently from 268cd89 to 01669e1 Compare February 22, 2024 22:19
Copy link
Contributor

@ASBishop ASBishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from me because CI shows it working

Discussions seem to be ongoing in openstack-k8s-operators/mariadb-operator#184, so it would help to know when everything has settled and it's OK to start merging other operator PRs like this one.

controllers/cinder_controller.go Outdated Show resolved Hide resolved
@zzzeek zzzeek requested a review from gibizer March 5, 2024 14:33
@zzzeek zzzeek force-pushed the integrate_oo_accounts branch from 59ad82d to 3695e9d Compare March 5, 2024 14:39
@zzzeek
Copy link
Contributor Author

zzzeek commented Mar 5, 2024

/retest

controllers/cinder_controller.go Outdated Show resolved Hide resolved
@zzzeek zzzeek force-pushed the integrate_oo_accounts branch from 3695e9d to c63b424 Compare March 5, 2024 18:50
Copy link
Contributor

@ASBishop ASBishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 5, 2024
Copy link
Contributor

openshift-ci bot commented Mar 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ASBishop, zzzeek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Mar 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 844d789 into openstack-k8s-operators:main Mar 5, 2024
7 checks passed
ASBishop pushed a commit to ASBishop/cinder-operator that referenced this pull request Mar 11, 2024
…rators/fix_kuttl_telemetry_assert

Fix kuttl asserts for telemetry changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants